package com.csnj.core.Srvs.SysManager;
import com.csnj.common.biz.BaseBiz;
import com.csnj.core.dao.SysLogMapper;
import com.csnj.core.entity.SysLog;
import org.springframework.stereotype.Service;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;

/**
 * Created by xiabin on 2018/12/17.
 */
@Service
public class SysLogSrvs extends BaseBiz<SysLogMapper, SysLog> {
    public CompletableFuture<Void> InsertSelectiveAsync(SysLog t) {
        CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {
            insertSelective(t);
        });
        return future;
    }

    public CompletableFuture<Long> GetCount() {
        CompletableFuture<Long> future = CompletableFuture.supplyAsync(() -> selectCount(new SysLog()));
        return future;
    }
}
